package org.yangspring.samples.mvc.listeners;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;

/**
 * Created by franklin on 6/27/2017.
 */

@Component
public class ZhangsanListener implements ApplicationListener<ContentEvent> {

    private static final Logger logger = LoggerFactory.getLogger(ZhangsanListener.class);

    @Override
    public void onApplicationEvent(final ContentEvent event) {
        logger.warn("\nZhang san Receive new message:\t" + event.getSource());
    }
}
